<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>医加加博客-注册界面</title>
    <link rel="stylesheet" href="../../static/plugins/layui/css/layui.css">
    <link rel="stylesheet" href="../../static/css/style/zhuce.css">
</head>
<body class="beijing">
<div class="zhongjian01">
  <div class="tu01">
    <img class="tu02" src="../../static/imgs/uimgs/zhuce_tu01.jpg" alt="">
  </div>
  <div class="tou01">
    <p><h2>注册账号</h2></p>
  </div>
    <div class="biao01">
        <form class="biaodan01 layui-form" action="/cus/regist" method="post">
            <ul class="biaodan02">
          <li>
              <div class="layui-form-item">
            <label class="layui-form-label">账号</label>
            <div class="paiban01">
              <input type="text" name="count" required  lay-verify="required" placeholder="请输入账号" autocomplete="off" class="layui-input">
            </div>
          </div>
          </li>
                <li>
                 <div class="layui-form-item">
                 <label class="layui-form-label">密码</label>
                 <div class="paiban01">
                 <input type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
                 </div>
                 </div>
                </li>
                <li>
                    <div class="layui-form-item">
                        <label class="layui-form-label">姓名</label>
                        <div class="paiban01">
                            <input type="text" name="name" required  lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </li>
                <li>
                    <div class="layui-form-item">
                        <label class="layui-form-label">性别</label>
                        <div class="paiban01">
                            <input type="radio" name="sex" value="nan" title="男" checked>
                            <input type="radio" name="sex" value="nv" title="女" >
                        </div>
                    </div>
                </li>
                <li>
                    <div class="layui-form-item">
                        <label class="layui-form-label">生日</label>
                        <div class="paiban01">
                            <input type="text" name="date" id="date" lay-verify="date" placeholder="请输入出生日期" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </li>
                <li>
                    <div class="layui-form-item">
                        <label class="layui-form-label">电话</label>
                        <div class="paiban01">
                            <input type="tel" name="phone" lay-verify="required|phone" placeholder="请输入手机号码" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </li>
                <li>
                    <div class="layui-form-item">
                        <label class="layui-form-label">邮箱</label>
                        <div class="paiban01">
                            <input type="text" name="email" lay-verify="email" autocomplete="off" placeholder="请输入常用邮箱" class="layui-input">
                        </div>
                    </div>
                </li>
                <li>
                    <div class="layui-form-item">
                        <label class="layui-form-label">地址</label>
                        <div class="paiban01">
                            <input type="text" name="address" lay-verify="title" autocomplete="off" placeholder="请输入居住地址" class="layui-input">
                        </div>
                    </div>
                </li>
            </ul>
            <div class="layui-form-item">
                <div class="xieyi">
                    <input type="checkbox" checked="" name="open" lay-skin="switch" lay-filter="switchTest" lay-text="同意|不同意">
                    <a href="">《医加加博客用户协议》</a>
                </div>
            </div>
            <div class="btn_zc01"><button class="layui-btn layui-btn-radius layui-btn-normal">立即注册</button>
                <button  class="layui-btn layui-btn-radius layui-btn-warm">现在登录</button></div>
        </form>
    </div>
    <div class="bibian">@医加加  for 2020 </div>

</div>
<script src="../../static/plugins/layui/layui.js"></script>
<script type="text/javascript" src="https://cdn.bootcss.com/canvas-nest.js/1.0.1/canvas-nest.min.js"></script>　
<script>
    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,laydate = layui.laydate;

        //日期
        laydate.render({
            elem: '#date'
        });
        laydate.render({
            elem: '#date1'
        });

        //创建一个编辑器
        var editIndex = layedit.build('LAY_demo_editor');

        //自定义验证规则
        form.verify({
            title: function(value){
                if(value.length < 5){
                    return '至少得5个字符啊';
                }
            }
            ,pass: [/(.+){6,12}$/, '密码必须6到12位']
            ,content: function(value){
                layedit.sync(editIndex);
            }
        });

        //监听指定开关
        form.on('switch(switchTest)', function(data){
            layer.msg('您选择了：'+ (this.checked ? '同意用户协议' : '不同意用户协议'), {
                offset: '6px'
            });

            layer.tips('请仔细阅读用户协议', data.othis)
        });

        //监听提交
        form.on('submit(demo1)', function(data){
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return false;
        });

        //表单初始赋值
//        form.val('example', {
//            "username": "贤心" // "name": "value"
//            ,"password": "123456"
//            ,"interest": 1
//            ,"like[write]": true //复选框选中状态
//            ,"close": true //开关状态
//            ,"sex": "女"
//            ,"desc": "我爱 layui"
//        })
    });
</script>

</body>
</html>